home *** CD-ROM | disk | FTP | other *** search
/ Zoom 2 / Zoom - Release 2 (1996)(Active Software)[!].iso / texts / amoszine / source / ag_exe_in_amos.amos / ag_exe_in_amos.amosSourceCode
AMOS Source Code  |  1992-09-02  |  4KB  |  178 lines

  1. ' *** Right here is the example on how to save exe files inside your Amos
  2. ' *** listings.  (and how to run them) 
  3.  
  4.  
  5. ' *** Idea by : Steve (I'm no lamer ya know) Bye 
  6.  
  7. ' *** Author  : Andy (maybe not Steve, but it's an oldie) Gibson 
  8.  
  9.  
  10. ' *** distributed via Amoszine Issue #7 for all to share.
  11.  
  12. ' *** Should run on all versions of Amos, but I have included some Pro 
  13. ' *** commands at the end (all commented out to keep this compatible)
  14.  
  15. ' *** Remove all the Wait 70 and Centre "xxx" etc to make this run 
  16. ' *** a hell of a lot faster !  I've just included all the crap so you 
  17. ' *** can see "on-screen" what is going on.
  18.  
  19.  
  20.  
  21.  
  22.  
  23. ' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  24.  
  25.  
  26.  
  27. ' *** Open a screen to display information on... 
  28.   Screen Open 0,640,200,4,Hires : Curs Off : Flash Off 
  29.   Palette $0,$F00,$FF0,$F0
  30.   Cls 0 : Paper 0 : Pen 1
  31.  
  32.  
  33. ' *** Remove this later ...
  34.   Locate 0,10 : Cline 
  35.   Centre "Checking Bank for PPmore"
  36.   Wait 70
  37.  
  38.  
  39.  
  40. ' *** Check length of bank 10. If it's empty then we shall load in 
  41. ' *** PPMore.
  42.  
  43. If Length(10)=0
  44.  
  45. ' *** Remove this later ...
  46.   Locate 0,10 : Cline 
  47.   Centre "Loading PPMore from disk"
  48.   Wait 70
  49.  
  50.  
  51.    FILE$="Amoszine_Issue_Seven:C/PPMore"
  52.    
  53.    Open In 1,FILE$
  54.    FILE_LENGTH=Lof(1)
  55.    Close 1
  56.    
  57.    Reserve As Chip Data 10,FILE_LENGTH
  58.    Bload FILE$,10
  59.    
  60. End If 
  61.  
  62.  
  63.  
  64.  
  65. ' *** Remove this later ...
  66.   Locate 0,10 : Cline 
  67.   Centre "PPmore now in bank 10"
  68.   Wait 70
  69.  
  70.   Locate 0,10 : Pen 2 : Cline 
  71.   Centre "Saving PPmore to Ram:"
  72.   Wait 70
  73.  
  74.  
  75.  
  76.  
  77. ' *** Save the bank to ram:
  78.   Bsave "ram:ppmore",Start(10) To Start(10)+Length(10)
  79.  
  80.  
  81.  
  82.  
  83. ' *** remove this later ...
  84.   Locate 0,10 : Pen 3 : Cline 
  85.   Centre "Goint to Wbench now"
  86.   Wait 70
  87.  
  88.  
  89.  
  90.  
  91. ' *** Get rid of Amos display
  92.   Amos To Back 
  93.  
  94.  
  95.  
  96.  
  97. ' *** Right - Doscall time to run ppmore - Amos Pro users, please see
  98. ' *** below for a simpler method you can use.
  99.  
  100.   COMMAND$="ram:ppmore amoszine_issue_seven:Extractor.doc"
  101.   Dreg(1)=Varptr(COMMAND$)
  102.   Dreg(2)=0
  103.   Dreg(3)=0
  104.   XEXECUTE=Doscall(-222)
  105.  
  106.  
  107.  
  108. ' *** Bring back Amos
  109.   Amos To Front 
  110.  
  111.  
  112.  
  113.  
  114. ' *** Remove this later ...
  115.   Locate 0,10 : Pen 3 : Cline 
  116.   Centre "Hello I'm back again !!!"
  117.   Wait 100
  118.  
  119.  
  120.  
  121. ' *** Just get back to the editor here 
  122.   Edit 
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. ' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  131.  
  132.  
  133. ' *** Right all you Amos Pro users, this is the way in which I normally
  134. ' *** call exe progs.  I think you require the RUN command in your C 
  135. ' *** Dir (only kickstart 1.3 users though).  It's simple and easy and 
  136. ' *** no nasty Doscalls either !!!   In fact this is the Lamer way to
  137. ' *** do things I guess, so why didn't Steve come up with this 'un ? 
  138.  
  139.  
  140.  
  141. ' ******** AMOS PRO EASY WAY OF DOING THE EXACT SAME THING !!! **********
  142.  
  143. ' *** Get rid of Amos display
  144.   Amos To Back 
  145.  
  146. ' *** exec ppmore from amos pro (please remove the REM)
  147.   Rem Exec "ram:ppmore amoszine_issue_seven:extractor.doc"   
  148.  
  149. ' *** Bring back Amos
  150.   Amos To Front 
  151.  
  152.   Edit 
  153.  
  154. ' ***********************************************************************  
  155.  
  156.  
  157. ' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  158.  
  159.  
  160. ' *** Please note that if you are still living in the dark ages and use
  161. ' *** Kickstart 1.3, then you MUST have the RUN command in your C Dir
  162. ' *** before any of the above examples will work 100% !!!
  163. ' *** Upgrade folks please as its a pain trying to keep everything 
  164. ' *** compatible with the older systems.  ;) 
  165. ' ***
  166. ' *** PPMore also requires PowerPacker.Library and Reqtools.Library in 
  167. ' *** your Libs: Dir of your Boot Disk.
  168. ' ***
  169. ' *** Steve informs me that you MUST reserve as CHIP DATA or the compiler
  170. ' *** won't compile your proggy !  I have not had this problem yet, but
  171. ' *** better to be safe than sorry.
  172. ' ***
  173. ' *** If you do ever get the compiler saying ... NOT AN AMOS PROGRAM 
  174. ' *** then just save your work, Quit Amos and load it back up and try
  175. ' *** again.  That may solve the solution !  :)
  176.  
  177.  
  178. ' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-